package app

import (
	"administrator/app/apputils/tokenutils"
	"administrator/app/controllers/configuration"
	"administrator/app/controllers/user"
	"gitee.com/aurora-engine/aurora"
)

type AdministratorServer struct {
	*aurora.Engine
	//添加控制器
	User          *user.Control
	MenuManage    *configuration.MenuManagement
	OrgManage     *configuration.OrgManagement
	RoleManage    *configuration.RoleManagement
	AccountManage *configuration.AccountManagement
	FuncManage    *configuration.FuncManagement
	ToolManage    *configuration.ToolManagement
}

func (admin *AdministratorServer) Server() {
	// 注册系统参数 token 参数解析
	admin.Variate(&tokenutils.Token{}, tokenutils.GetToken)
	// 全局注册 只能放在 Server 中执行 全局的Use会在 Router() 之前初始化
	admin.Use(option...)
	admin.Interceptors(aurora.Log())

}
